package asava.trees;

/**
 * @author Tim Richter
 */
public final class Literal extends Tree {
    public static final int INT = 1;
    public static final int NUMBER = 2;
    public static final int BOOLEAN = 3;
    public static final int STRING = 4;
    public static final int NULL = 5;

    public int valueKind;
    public Object value;

    public Literal(final int valueKind,
                   final Object value) {
        this.valueKind = valueKind;
        this.value = value;
    }

    @Override
    public int kind() {
        return TreeKind.LITERAL;
    }

    @Override
    public void accept(final TreeVisitor visitor) {
        visitor.visit(this);
    }
}
